//
//  Car.m
//  HomeWork-19
//
//  Created by 鹏飞罗 on 16/8/9.
//  Copyright © 2016年 罗鹏飞. All rights reserved.
//

#import "Car.h"

@implementation Car
- (instancetype)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if ( self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+ (Car *)carWithDictionary:(NSDictionary *)dictionary {
    return [[self alloc] initWithDictionary:dictionary];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        _car_id = value;
    }
}
- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}
@end
